package com.newhonor.server.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.newhonor.server.pojo.Admin;
import com.newhonor.server.pojo.Menu;
import com.newhonor.server.pojo.ResBean;
import com.newhonor.server.pojo.Role;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @Author newhonor
 * @Date 2021/2/19 22:45
 * @Version 1.0
 **/
public interface IAdminService extends IService<Admin> {

    /**
     * 登录后返回token
     * @param username
     * @param password
     * @param code
     * @param request
     * @return
     */
    public ResBean login(String username, String password, String code, HttpServletRequest request);

    /**
     * 根据用户名获取用户
     * @param username
     * @return
     */
    Admin getAdminByUserName(String username);

    /**
     * 根据用户id查询角色
     * @param adminId
     * @return
     */
    List<Role> getRoles(Integer adminId);

    List<Admin> getAllAdmins(String keywords);
}
